// Copyright (C) 2025 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

.explore-page {
  position: relative;
  overflow: auto;
  padding: 0.25rem;

  &__header {
    display: flex;
    align-items: center;
  }

  .pf-chart-card {
    border-radius: $pf-border-radius;
    border: solid 1px $pf-colour-thin-border;
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    &__chart {
      grid-row: 2;
      grid-column: 1 / 4;
    }

    &__button {
      grid-column: 4;
      grid-row: 1;
    }
  }

  .pf-vertical-split-container {
    display: flex;
    flex-direction: row;
    height: 100%;

    &__left-pane {
      position: relative;
      display: flex;
      flex-direction: row;

      &__content {
        flex: 1;
        overflow: auto;
      }

      &__resize-handle {
        display: block;
        height: 100%;
        width: 5px;
        background-color: darkgrey;

        // Ensures that the resize-handler is overlayed
        // on top of content and stays in a fixed
        // position at the right of the left-pane
        z-index: 2;
        position: absolute;
        right: 0;
        cursor: col-resize;
      }
    }

    &__right-pane {
      flex: 1;
    }
  }

  &__rowish {
    position: relative;
    display: flex;
    flex-direction: row;

    & > * {
      width: 50%;
    }
  }

  &__columnar {
    position: relative;
  }
}

.pf-column-controller-fixed-size {
  max-height: 300px;
}

.pf-column-controller-panel {
  font-family: $pf-font;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 280px;
  & > .pf-search-bar {
    margin-bottom: 8px;
    display: flex;
    & > .pf-search-box {
      flex-grow: 1;
    }
  }
  .pf-column-controller-item {
    // display: block; // Put each item on a new line
    margin-top: 5px;
  }

  .pf-column-controller-item-on-hover {
    float: right;
  }

  .pf-column-controller-header {
    align-items: baseline;
    display: flex;
    position: sticky;
    top: 0;
    font-size: 1em;
    z-index: 1;
    font-size: 0.75em;
    padding-bottom: 2px;
    min-width: max-content;
    margin-right: auto;
  }
  .pf-column-controller-container {
    position: relative;
    margin-bottom: 16px;
  }
}
